//
//  DYAFNetTool.h
//  Craft
//
//  Created by BetaTheta on 16/3/7.
//  Copyright © 2016年 BetaTheta. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef void(^BlockOfSuccess)(id result);

typedef NS_ENUM(NSUInteger, DYResponseStyle) {
    
    DYJSON,
    DYCML,
    DYDATA
    
};

typedef NS_ENUM(NSUInteger, DYRequestStyle) {
    DYRequestJSON,
    DYRequestString,
};

@interface DYAFNetTool : NSObject

+(void)GETNetWithUrl:(NSString *)url body:(id)body headerFile:(NSDictionary *)header response:(DYResponseStyle)responseStyle  success:(BlockOfSuccess)success
             failure:(void (^)(NSError *error))failure;


+(void)POSTNetWithUrl:(NSString *)url body:(id)body bodyStyle:(DYRequestStyle)bodyRequestStyle headerFile:(NSDictionary *)header response:(DYResponseStyle)responseStyle  success:(BlockOfSuccess)success
              failure:(void (^)(NSError *error))failure;




@end
